Skip to content

[18-stable] Remove unnecessary pods RBAC permissions - #741

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:18-stablefrom
stuggi:rbac-cleanup-pods-18-stable
Jul 28, 2026
Merged

[18-stable] Remove unnecessary pods RBAC permissions#741
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:18-stablefrom
stuggi:rbac-cleanup-pods-18-stable

Conversation

@stuggi

@stuggi stuggi commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The workload rbacRules and the matching kubebuilder RBAC marker in the controller granted the workload service account full CRUD (create/delete/get/list/patch/update/watch) on core Pods, but that service account never reads or writes Pod objects directly. Remove the unused grants.

The kubebuilder RBAC marker for pods (get;list) is kept: lib-common's VerifyNetworkStatusFromAnnotation, called from this controller to verify NetworkAttachments, lists Pods using the controller-manager's own client, so the manager's ClusterRole (config/rbac/role.yaml) still needs get;list on pods. Regenerate config/rbac/role.yaml.

Includes ef1e3b5

(cherry picked from commit 2adbb94)

@openshift-ci
openshift-ci Bot requested review from Deydra71 and dprince July 28, 2026 09:38
@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stuggi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

The workload rbacRules and the matching kubebuilder RBAC marker in
the controller granted the workload service account full
CRUD (create/delete/get/list/patch/update/watch) on core Pods, but
that service account never reads or writes Pod objects directly.
Remove the unused grants.

The kubebuilder RBAC marker for pods (get;list) is kept: lib-common's
VerifyNetworkStatusFromAnnotation, called from this controller to
verify NetworkAttachments, lists Pods using the controller-manager's
own client, so the manager's ClusterRole (config/rbac/role.yaml) still
needs get;list on pods. Regenerate config/rbac/role.yaml.

Includes ef1e3b5

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
(cherry picked from commit 2adbb94)
@stuggi
stuggi force-pushed the rbac-cleanup-pods-18-stable branch from 98690ac to 252b867 Compare July 28, 2026 09:42
@xek

xek commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label Jul 28, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 1496c8f into openstack-k8s-operators:18-stable Jul 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants